package edu.qichen.onlineBlog.log.controller;

import edu.qichen.onlineBlog.framework.DataResult;
import edu.qichen.onlineBlog.log.service.LoginLogService;
import edu.qichen.onlineBlog.log.service.SyslogService;
import edu.qichen.onlineBlog.log.vo.PageLoginLogReq;
import edu.qichen.onlineBlog.log.vo.PageLoginLogRes;
import edu.qichen.onlineBlog.log.vo.PageSyslogReq;
import edu.qichen.onlineBlog.log.vo.PageSyslogRes;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能:
 * 作者:程序员欧阳子韩
 * 日期:2024/6/23 18:55
 */
@RestController
@RequestMapping("/operaLog")
@Tag(name = "操作日志")
public class SyslogController {
    @Resource
    private SyslogService syslogService;

    @PostMapping("/logPage")
    @Operation(summary = "登录日志分页")
    public DataResult<PageSyslogRes> userPage(@RequestBody PageSyslogReq pageSyslogReq) {
        return DataResult.success(syslogService.selectPage(pageSyslogReq));
    }

}
